<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h1>活动价:￥<span>500.00</span></h1>

    <ul>
    </ul>
    <script src="../animate.js"></script>

    <script>
        var price = document.querySelector('h1 span');
        creatAnimation({
            from: 500,
            to: 99,
            totalMs: 2000,
            onmove: function (n) {
                price.innerHTML = n.toFixed(2);
            },
            onend: function () {
                price.style.color = "red"
            }
        });
    </script>
</body>

</html>